﻿/// <reference path="../jquery.min.js" />
/// <reference path="../module/rsseasy.v2.js" />
/// <reference path="../module/adapter.js" />

$(function () {
    $("#takephotospage [action]").click(function () {
        JsAdapter.onTakePhotos = function (json) {
            $("#takephotoscutpath").html(json["path"]);
            $("#takephotoscutimg").html('<img src="data:image/png;base64,' + json["base64"] + '" />');

            //上传base64图片数据
            new Ajax("upload/base64").keyvalue("base64", json["base64"]).postJson(function () {
            });
        }
        JsAdapter.TakePhotos({ "action": $(this).attr("action"), "width": 320, "scale": 0.5 }).Submit();
    });
});